<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_validate.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:15 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>CL后台管理</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式，基于Bootstrap3最新版本开发的扁平化主题，她采用了主流的左右两栏式布局，使用了Html5+CSS3等现代技术">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/Public/admin/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/admin/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/admin/css/animate.min.css" rel="stylesheet">
    <link href="/Public/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/Public/admin/css/style.min862f.css?v=4.1.0" rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-6" style="margin: 0 5%;width:90%;">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>添加导航</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="dropdown-toggle" data-toggle="dropdown" href="form_basic.html#">
                                <i class="fa fa-wrench"></i>
                            </a>
                            <ul class="dropdown-menu dropdown-user">
                                <li><a href="form_basic.html#">选项1</a>
                                </li>
                                <li><a href="form_basic.html#">选项2</a>
                                </li>
                            </ul>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal m-t" id="signupForm" method="post" action="">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">名称：</label>
                                <div class="col-sm-8">
                                    <input id="firstname" name="arr[title]" class="form-control" type="text" value="<?php echo ($list['title']); ?>">
                                    <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 这里写点提示的内容</span> -->
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">图标：</label>
                                <div class="col-sm-8">
                                    <input id="firstname" name="arr[icon]" class="form-control" type="text" onblur="icon(this.value,this)" value="<?php echo ($list['icon']); ?>">
                                    <i class="<?php echo ($list['icon']); ?>"></i>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">排序：</label>
                                <div class="col-sm-8">
                                    <input id="lastname" value="<?php echo ($list['ord']); ?>" name="arr[ord]" class="form-control" type="text" aria-required="true" aria-invalid="false" class="valid">
                                </div>
                            </div>
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">等级：</label>
                                <div class="col-sm-8">
                                    <select class="form-control" name="arr[level]" onclick="level(this.value)">
                                        <option value="1" <?php if($list['level'] == 1): ?>selected<?php endif; ?> >1级菜单</option>
                                        <option value="2" <?php if($list['level'] == 2): ?>selected<?php endif; ?> >2级菜单</option>
                                        <option value="3" <?php if($list['level'] == 3): ?>selected<?php endif; ?> >3级菜单</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group draggable">
                                <label class="col-sm-3 control-label">上级菜单：</label>
                                <div class="col-sm-8">
                                    <select class="form-control" name="arr[top_id]" id="top_id">
                                        <?php if(is_array($level)): foreach($level as $key=>$val): ?><option value="<?php echo ($val['id']); ?>" <?php if($val['id'] == $list['top_id']): ?>selected<?php endif; ?> ><?php echo ($val['title']); ?></option><?php endforeach; endif; ?>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">连接地址：</label>
                                <div class="col-sm-8">
                                    <input id="username" name="arr[url]" class="form-control" type="text" aria-required="true" aria-invalid="true" class="error" value="<?php echo ($list['url']); ?>">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">是否显示：</label>

                                <div class="col-sm-8">
                                    <label class="checkbox-inline i-checks">
                                        <input type="radio" value="1" name="arr[display]" <?php if($list["display"] == true): ?>checked="checked"<?php endif; ?>>是</label>
                                    <label class="checkbox-inline i-checks">
                                        <input type="radio" value="0" name="arr[display]" <?php if($list["display"] == false): ?>checked="checked"<?php endif; ?>>否</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">是否新建窗口：</label>

                                <div class="col-sm-8">
                                    <label class="checkbox-inline i-checks">
                                        <input type="radio" value="1" name="arr[opennew]" <?php if($list["opennew"] == true): ?>checked="checked"<?php endif; ?>>是</label>
                                    <label class="checkbox-inline i-checks">
                                        <input type="radio" value="0" name="arr[opennew]" <?php if($list["opennew"] == false): ?>checked="checked"<?php endif; ?>>否</label>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-8 col-sm-offset-3">
                                    <button class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="/Public/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/Public/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/Public/admin/js/content.min.js?v=1.0.0"></script>
    <script src="/Public/admin/js/plugins/validate/jquery.validate.min.js"></script>
    <script src="/Public/admin/js/plugins/validate/messages_zh.min.js"></script>
    <script src="/Public/admin/js/demo/form-validate-demo.min.js"></script>
    <script src="/Public/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script>
        $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
    </script>
    
    <!-- style -->
    <script>
    function level(e) {
        $.ajax({
            type: "POST",
            url: 'Nav_level',
            data: {level:e},
            dataType: "json",
            success: function(data){
                console.log(data);
                $('#top_id').empty();   //清空resText里面的所有内容
                var html = ''; 
                $.each(data, function(commentIndex, comment){
                    html += '<option value='+comment['id']+'>' + comment['title'] + '<option>'
                });
                $('#top_id').html(html);
              }

        })
    }
    function icon(e,c) {
        console.log(e);
        //this.nextSbiling.attr('class',e);
    }
    </script>
    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/form_validate.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:16 GMT -->
</html>